package cn.bird.storm.validated.paramcheck.model.notempty;


import cn.bird.storm.validated.paramcheck.CheckTrait;
import cn.bird.storm.validated.paramcheck.ParameterCheckBuilder;

public interface NotEmptyTrait extends CheckTrait {
    String NAME = "NOT_EMPTY_CHECK";
    /**
     * 非空参数校验
     * Coll.notEmpty
     * Str.notEmpty
     */
    default ParameterCheckBuilder notEmpty(String fieldName, Object object) {
        return richCheckModelMap(NAME,
                NotEmptyCheckBean.builder()
                        .msg(fieldName)
                        .value(object)
                        .build(),
                NotEmptyCheckModel::new
        );
    }


}
